<div id="main_container">

	{$oZoneHeader}
    
    <div class="main_content">
        {$oZoneTopMenu}
        <div class="center_content">  
            <div class="left_content">
                {$oZoneLeftMenu}
                <h4>Les partenaires : </h4> 
                    
                <table style="width:240px" id="rounded-corner" summary="2007 Major IT Companies' Profit">
                        {foreach $liste as $item}
                        <tr>
                            <td><a href="{jurl 'partenaire~BoPartenaire:index', array('id'=>$item->IdPartenaire)}">{$item->Part_Libelle}</a></td>
                        </tr>
                        {/foreach}
                </table>
            </div>
    
            <div class="right_content">
                    {if $partenaire->IdPartenaire}
                        <h2>Editer un partenaire</h2> 
                    {else}
                        <h2>Ajouter un partenaire</h2> 
                    {/if}
                    
                <form action="{jurl 'partenaire~BoPartenaire:sauvegarder'}" method="post" id="editPartenaire" name="editPartenaire" enctype="multipart/form-data">
                    <input type="hidden" name="id" value="{$partenaire->IdPartenaire}" />
                    <input type="hidden" name="IdAdminPartenaire" value="{$partenaire->IdAdminPartenaire}" />
                    <dl>
                		<dt><label>Nom *: </label></dt>
                 		<dd><input type="text" name="part_nom" value="{$partenaire->Part_Libelle}" validation="required"/></dd>
              		</dl>
                    <dl>
                		<dt><label>Texte *: </label></dt>
                 		<dd><input type="text" name="part_texte" value="{$partenaire->Part_Presentation}" validation="required"/></dd>
              		</dl>
                    <dl>
                		<dt><label>Code *: </label></dt>
                 		<dd><input type="text" name="part_code" value="{$partenaire->Part_Code}" validation="required"/></dd>
              		</dl>
                    
                     <dl style="height:auto">
                        <dt><label>Adresse : </label></dt>
                            <dd style="width:600px;">
                            <textarea id="content" name="content" >{$partenaire->Part_Adresse}</textarea>
                            <script type="text/javascript">
                                {literal}CKEDITOR.replace( 'content', {width:'600px', toolbar:'AOToolbar'}) ;{/literal}
                            </script>
                        </dd>
                    </dl>
                    <dl>
                		<dt><label>Code Postal : </label></dt>
                 		<dd><input type="text" name="part_cp" value="{$partenaire->Part_CP}" /></dd>
              		</dl>

                    <dl>
                		<dt><label>Ville : </label></dt>
                 		<dd><input type="text" name="part_ville" value="{$partenaire->Part_Ville}" /></dd>
              		</dl>
                    <dl>
                		<dt><label>Téléphone : </label></dt>
                 		<dd><input type="text" name="part_phone" value="{$partenaire->Part_Telephone}" /></dd>
              		</dl>
                    <dl>
                		<dt><label>Site web : </label></dt>
                 		<dd><input type="text" name="part_web" value="{$partenaire->Part_Url}" /></dd>
              		</dl>
                    <dl>
                		<dt><label>Email : </label></dt>
                 		<dd><input type="text" name="part_mail" value="{$partenaire->Part_Email}" /></dd>
              		</dl>
                    <dl style="height:23px">
                		<dt><label>Logo : </label></dt>
                 		<dd><input type="file" name="photo" value="{$partenaire->Part_Logo}" /></dd>
                        
              		</dl>
                    {if $partenaire->IdPartenaire}
                            {assign $pathImagePartenaire = PARTENAIRE_PATH_LOGO}
                 		    <img src="{$pathImagePartenaire}{$partenaire->Part_Logo}" alt="{$partenaire->Part_Libelle}" width="90" height="60" style="margin-left:155px;"/>
                            <input type="hidden" name="photoOld" value="{$partenaire->Part_Logo}" />
                    {/if}
                    <dl style="height:auto">
                        <dt><label>Service : </label></dt>
                            <dd style="width:600px;">
                            <textarea id="content2" name="content2" >{$partenaire->Part_Service}</textarea>
                            <script type="text/javascript">
                                {literal}CKEDITOR.replace( 'content2', {width:'600px', toolbar:'AOToolbar'}) ;{/literal}
                            </script>
                        </dd>
                    </dl>
                    <dl>
                		<dt><label>Type : </label></dt>
                        {if $partenaire->Part_Type == ""}
                 		<dd>
                            <input type="radio" name="statut" value="1" /> Journal
                            <input type="radio" name="statut" value="0" /> Web
                        </dd>
                        {else}
                            {if $partenaire->Part_Type == PARTENAIRE_TYPE_PARTENAIRE}
                                {assign $type = PARTENAIRE_TYPE_PARTENAIRE_NAME}
                                {$type}
                            {else}
                                {assign $typePro = PARTENAIRE_TYPE_PROFESSIONNEL_NAME}
                                {$typePro}
                            {/if}
                        {/if}
              		</dl>
                    <dl>
                		<dt><label>Parution : </label></dt>
                 		<dd>
                            <input type="radio" name="parution" value="0" CHECKED='{if !$partenaire->Part_ParutionWeb}CHECKED{/if}' /> Journal <input type="text" name="nbr_jrnal" value="{$partenaire->Part_Nbre_Journal}" style="width:20px;" />
                            <input type="radio" name="parution" value="1" CHECKED='{if $partenaire->Part_ParutionWeb}CHECKED{/if}'/> Web <input type="text" name="nbr_web" value="{$partenaire->Part_Nbre_Web}" style="width:20px;" />
                        </dd>
              		</dl>
                    <dl>
                		<dt><label>Login *: </label></dt>
                 		<dd><input type="text" name="part_login" value="{$partenaire->AP_Login}" validation="required" /></dd>
                        
              		</dl>
                    <dl>
                		<dt><label>Mot de passe *: </label></dt>
                 		<dd><input type="password" name="part_mdp" value="" validation="required" /></dd>
                        
              		</dl>
                    <dl class="submit">
                        <input style="margin-right:10px;"  class="valider" title="Valider" type="submit" value="" />
                 		<a title="Annuler" href="{jurl 'partenaire~BoPartenaire:index'}" class="bt_green"><span class="bt_green_lft"></span><strong>Annuler</strong><span class="bt_green_r"></span></a>
                        {if $partenaire->IdPartenaire}
                 		<!--<a title="Annuler" href="{jurl 'partenaire~BoPartenaire:supprimer', array('id'=>$partenaire->IdPartenaire)}" class="bt_red"><span class="bt_red_lft"></span><strong>Supprimer</strong><span class="bt_red_r"></span></a>-->
                        {/if}
                    </dl>
                  
                 </form>

            </div><!-- end of right content-->
        </div>   <!--end of center content -->

        <div class="clear"></div>
    </div> <!--end of main content-->
    <div class="footer">
    </div>
</div>

{literal}
   
    <script type="text/javascript">
       

        // form validation
        var demoForm = $("#editPartenaire");
        demoForm.validation();
        demoForm.submit(function(e) {

            $("#valid-form").remove();
            if(demoForm.validate()) {
                document.forms["editPartenaire"].submit();
            }
            e.preventDefault();
        });
    </script>
{/literal}
